<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../../../../style.css" type="text/css" media="screen">
<link rel="stylesheet" href="../../../../../print.css" type="text/css" media="print">
<meta content="ITweenTarget,org.as3lib.kitchensync.action.tween.ITweenTarget,endValue,startValue,clone,reset,updateTween" name="keywords">
<title>org.as3lib.kitchensync.action.tween.ITweenTarget</title>
</head>
<body>
<script type="text/javascript" language="javascript" src="../../../../../asdoc.js"></script><script type="text/javascript" language="javascript" src="../../../../../cookies.js"></script><script type="text/javascript" language="javascript">
<!--
				asdocTitle = 'ITweenTarget - KitchenSyncLib v2.0';
				var baseRef = '../../../../../';
				window.onload = configPage;
			--></script>
<table style="display:none" id="titleTable" cellspacing="0" cellpadding="0" class="titleTable">
<tr>
<td align="left" class="titleTableTitle">API Documentation</td><td align="right" class="titleTableTopNav"><a onclick="loadClassListFrame('../../../../../all-classes.html')" href="../../../../../package-summary.html">All&nbsp;Packages</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../../../../all-classes.html')" href="../../../../../class-summary.html">All&nbsp;Classes</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../../../../index-list.html')" href="../../../../../all-index-A.html">Index</a>&nbsp;|&nbsp;<a href="../../../../../index.html?org/as3lib/kitchensync/action/tween/ITweenTarget.html&amp;org/as3lib/kitchensync/action/tween/class-list.html" id="framesLink1">Frames</a><a onclick="parent.location=document.location" href="" style="display:none" id="noFramesLink1">No&nbsp;Frames</a></td><td rowspan="3" align="right" class="titleTableLogo"><img alt="Adobe Logo" title="Adobe Logo" class="logoImage" src="../../../../../images/logo.jpg"></td>
</tr>
<tr class="titleTableRow2">
<td align="left" id="subTitle" class="titleTableSubTitle">Interface&nbsp;ITweenTarget</td><td align="right" id="subNav" class="titleTableSubNav"><a href="#propertySummary">Properties</a>&nbsp;| <a href="#methodSummary">Methods</a></td>
</tr>
<tr class="titleTableRow3">
<td colspan="2">&nbsp;</td>
</tr>
</table>
<script type="text/javascript" language="javascript">
<!--
if (!isEclipse() || window.name != ECLIPSE_FRAME_NAME) {titleBar_setSubTitle("Interface ITweenTarget"); titleBar_setSubNav(false,true,false,false,false,false,true,false,false,false,false,false,false,false);}
--></script>
<div class="MainContent">
<table cellspacing="0" cellpadding="0" class="classHeaderTable">
<tr>
<td class="classHeaderTableLabel">Package</td><td><a onclick="javascript:loadClassListFrame('class-list.html')" href="package-detail.html">org.as3lib.kitchensync.action.tween</a></td>
</tr>
<tr>
<td class="classHeaderTableLabel">Interface</td><td class="classSignature">public interface ITweenTarget extends <a href="none">org.as3lib.math.INumericController</a></td>
</tr>
<tr>
<td class="classHeaderTableLabel">Subinterfaces</td><td><a href="../tween/IFilterTweenTarget.html">IFilterTweenTarget</a></td>
</tr>
<tr>
<td class="classHeaderTableLabel">Implementors</td><td><a href="../tween/KSTween.html">KSTween</a>, <a href="../tween/SoundTransformTarget.html">SoundTransformTarget</a>, <a href="../tween/TargetProperty.html">TargetProperty</a>, <a href="../tween/TimelineController.html">TimelineController</a>, <a href="../tween/TintTweenTarget.html">TintTweenTarget</a></td>
</tr>
</table>
<p></p>
  A <em>tween target</em> is a bundle that wraps up a property or other value that can be 
  tweened by a KSTween object.
  In most cases, this will be a property of an object (see TargetProperty class) but it 
  could also be something more complex like a tween target that sets the scaleX and scaleY
  of a sprite simultaneously or a property of a filter (which can't be set directly). 
  
  Tween targets are useful because they allow the value-setting portion of a tween to be
  abstracted away and seperated from the timing and easing. This allows a variety of differnt
  types of values, such as filter properties, colors, and sound panning, to be set without 
  subclassing KSTween for every instance. It also allows for a single KSTween object to 
  control multiple tween targets.  
  
  The tween target bundle will have a start and end value as well as providing an accessor
  to the current value of the target (via INumericController). 
  
  Generally speaking, a KSTween will handle anything related to the timing of the tween
  while the ITweenTarget handles anything related to the values of the tween. For example,
  KSTween holds the duration of the tween and the controls for starting, stopping and pausing
  while the tween target has the start and end values and holds a reference to the object
  to be tweened.
    
  <p></p>
<p>
<span class="classHeaderTableLabel">See also</span>
</p>
<div class="seeAlso">
<a href="KSTween.html" target="">KSTween</a>
<br>
<a href="TargetProperty.html" target="">TargetProperty</a>
</div>
<br>
<hr>
</div>
<a name="propertySummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Properties</div>
<table id="summaryTableProperty" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Property</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#endValue">endValue</a> : Number<div class="summaryTableDescription">
   The value that the tweenTarget will tween to.</div>
</td><td class="summaryTableOwnerCol">ITweenTarget</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#startValue">startValue</a> : Number<div class="summaryTableDescription">
   The value that the tweenTarget will begin from.</div>
</td><td class="summaryTableOwnerCol">ITweenTarget</td>
</tr>
</table>
</div>
<a name="methodSummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Methods</div>
<table id="summaryTableMethod" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Method</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#clone()">clone</a>():<a href="../tween/ITweenTarget.html">ITweenTarget</a>
</div>
<div class="summaryTableDescription"> 
   Creates a deep copy of the tweenTarget object.</div>
</td><td class="summaryTableOwnerCol">ITweenTarget</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#reset()">reset</a>():void</div>
<div class="summaryTableDescription"> 
   Resets the current value to it's initial pre-tweened state.</div>
</td><td class="summaryTableOwnerCol">ITweenTarget</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#updateTween()">updateTween</a>(percentComplete:Number):Number</div>
<div class="summaryTableDescription">
   The main function that the Tween uses to update the TweenTarget.</div>
</td><td class="summaryTableOwnerCol">ITweenTarget</td>
</tr>
</table>
</div>
<script type="text/javascript" language="javascript">
<!--
showHideInherited();
--></script>
<div class="MainContent">
<a name="propertyDetail"></a>
<div class="detailSectionHeader">Property detail</div>
<a name="endValue"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">endValue</td><td class="detailHeaderType">property</td>
</tr>
</table>
<div class="detailBody">
<code>endValue:Number</code>&nbsp;&nbsp;[read-write]<p>
   The value that the tweenTarget will tween to.
   You can use NaN or AUTO_TWEEN_VALUE to use the value that exists when the tween runs.
   </p><span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function get endValue():Number</code>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function set endValue(value:Number):void</code>
<br>
</div>
<a name="startValue"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">startValue</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>startValue:Number</code>&nbsp;&nbsp;[read-write]<p>
   The value that the tweenTarget will begin from.
   You can use NaN or AUTO_TWEEN_VALUE to use the value that exists when the tween runs.
   </p><span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function get startValue():Number</code>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function set startValue(value:Number):void</code>
<br>
</div>
<a name="methodDetail"></a>
<div class="detailSectionHeader">Method detail</div>
<a name="clone()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">clone</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td>
</tr>
</table>
<div class="detailBody">
<code>public function clone():<a href="../tween/ITweenTarget.html">ITweenTarget</a></code><p> 
   Creates a deep copy of the tweenTarget object.
   Does not copy the state of the object (such as 
   its current progress in the tween).
   
   </p><p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code><a href="../tween/ITweenTarget.html">ITweenTarget</a></code> &mdash; 
                        ITweenTarget a clone of the tween target object 
   
                        
                     </td>
</tr>
</table>
<p>
<span class="label">See also</span>
</p>
<div class="seeAlso">
<a href="KSTween.html#clone()" target="">KSTween.clone()</a>
</div>
</div>
<a name="reset()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">reset</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function reset():void</code><p> 
   Resets the current value to it's initial pre-tweened state.
   (typically, sets the currentValue equal to the startValue).
   This is usually called by the reset() method of the KSTween class.
   
   </p><p>
<span class="label">See also</span>
</p>
<div class="seeAlso">
<a href="KSTween.html#reset()" target="">KSTween.reset()</a>
</div>
</div>
<a name="updateTween()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">updateTween</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function updateTween(percentComplete:Number):Number</code><p>
   The main function that the Tween uses to update the TweenTarget. 
   Sets the percentage complete.
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">percentComplete</span>:Number</code> &mdash; a number between 0 and 1 (but sometimes more or less) that represents
       the percentage of the tween that has been completed. This should update the currentValue.
   </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Number</code> &mdash; Number the new current value of the tween.
   
   </td>
</tr>
</table>
<p>
<span class="label">See also</span>
</p>
<div class="seeAlso">KSTween.update()</div>
<br>
<span class="label">Example</span>
<br>Typically this is implemented as such: 
   <div class='listing'><pre> 
    public function updateTween(percentComplete:Number):Number {
     return currentValue = percentComplete (endValue - startValue) + startValue;
   }
   </pre></div>
   
   <p></p>
</div>
<br>
<br>
<hr>
<br>
<p></p>
<center class="copyright"> 
</center>
</div>
</body>
</html>
<!-- -->
